<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
<!--    <link href="/css/bootstrap.css" rel="stylesheet">-->
</head>
<body>
<div th:include="/nav.html"></div>
<div style="display: flex; justify-content: space-around;">
    <div align="center" style=" width: 40% ;">
        <h2>登录</h2>
        <form  method="post" action="/home/login">
            <table class="table" border="1" style="width: 80%" cellspacing="0">
                <tr>
                    <td>账号</td>
                    <td><input type="text" name="phone" value=""></td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><input type="password" name="pwd" value=""></td>
                </tr>
                <tr>
                    <td></td>
                    <td ><input type="submit" value="登录"></td>
                </tr>
            </table>
            登录信息：<span th:text="${loginmsg}"></span>
        </form>
    </div>
    <hr>
    <div style="width: 55%;">
        <h3>管理员功能</h3>
        <div th:if="${session.who != null && session.who.role == 'adm'}">
            <ul>
                <li><a href="/adm/clz/show">班级管理</a></li>
                <li><a href="/adm/cou/show">课程管理</a></li>
                <li><a href="/adm/tea/show">教师管理</a></li>
                <li><a href="/adm/stu/show">学生管理</a></li>
                <li><a href="/adm/task/show">排课管理-安排课程</a></li>
            </ul>
        </div>
        <h3>学生功能</h3>
        <div th:if="${session.who != null && session.who.role == 'stu'}">
            <ul>
                <li><a href="/stu/go2updateMy">更改密码</a></li>
                <li><a href="#">更改头像</a></li>
                <li><a href="/stu/findMyCourse">查课程</a></li>
                <li><a href="/stu/findMyMark">查成绩</a></li>
            </ul>
        </div>
        <h3>教师功能</h3>
        <div th:if="${session.who != null && session.who.role == 'tea'}">
            <ul>
                <li><a href="/tea/go2updateMe">更改密码</a></li>
                <li><a href="/tea/findMyTaskPro">教师登分-Pro【版】</a></li>
                <li><a href="/tea/findMyTask">教师登分</a></li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>